From 52574e5e94e8d1381a7e5572fb96d149b688be48 Mon Sep 17 00:00:00 2001 From: justbur Date: Wed, 8 Jul 2015 11:35:40 -0400 Subject: [PATCH] Remove hide-popup call from update function Doesn't seem to be needed anymore after adding hide-popup to the pre-command-hook. --- which-key.el | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/which-key.el b/which-key.el index ce539253a7d..252aa2bda75 100644 --- a/which-key.el +++ b/which-key.el @@ -168,21 +168,20 @@ Used when `which-key-popup-type' is frame.") "Fill which-key--buffer with key descriptions and reformat. Finally, show the buffer." (let ((prefix-keys (this-single-command-keys))) - (if (> (length prefix-keys) 0) - (progn - (let* ((buf (current-buffer)) - ;; get formatted key bindings - (fmt-width-cons (which-key/get-formatted-key-bindings buf prefix-keys)) - (formatted-keys (car fmt-width-cons)) - (column-width (cdr fmt-width-cons)) - ;; populate target buffer - (popup-act-dim - (which-key/populate-buffer (key-description prefix-keys) - formatted-keys column-width (window-width)))) - ;; show buffer - (which-key/show-popup popup-act-dim))) - ;; command finished maybe close the window - (which-key/hide-popup)))) + (when (> (length prefix-keys) 0) + (let* ((buf (current-buffer)) + ;; get formatted key bindings + (fmt-width-cons (which-key/get-formatted-key-bindings buf prefix-keys)) + (formatted-keys (car fmt-width-cons)) + (column-width (cdr fmt-width-cons)) + ;; populate target buffer + (popup-act-dim + (which-key/populate-buffer (key-description prefix-keys) + formatted-keys column-width (window-width)))) + ;; show buffer + (which-key/show-popup popup-act-dim))))) +;; command finished maybe close the window +;; (which-key/hide-popup)))) ;; Show/hide guide buffer -- 2.30.2